import request from '@/utils/request'

export default {
  /**
   * 获取租户角色列表
   * @param {*} data
   * @returns
   */
  queryPage(data) {
    return request({
      url: '/energy-carbon/grass-core/tenantRole/queryPage',
      method: 'post',
      data
    })
  },
  /**
   * 新增租户角色
   * @param {*} data
   * @returns
   */
  roleAdd(data) {
    return request({
      url: '/energy-carbon/grass-core/tenantRole/add',
      method: 'post',
      data
    })
  },
  /**
   * 编辑租户角色
   * @param {*} data
   * @returns
   */
  roleUpdate(data) {
    return request({
      url: '/energy-carbon/grass-core/tenantRole/update',
      method: 'post',
      data
    })
  },
  /**
   * 租户角色详情
   * @param {*} data
   * @returns
   */
  detail(data) {
    return request({
      url: '/energy-carbon/grass-core/tenantRole/detail',
      method: 'post',
      data
    })
  },
  /**
   * 编辑租户角色，启用禁用
   * @param {*} data
   * @returns
   */
  enableOrDisable(data) {
    return request({
      url: '/energy-carbon/grass-core/tenantRole/enableOrDisable',
      method: 'post',
      data
    })
  },
  /**
   * 新增删除
   * @param {*} data
   * @returns
   */
  roleDelById(data) {
    return request({
      url: '/energy-carbon/grass-core/tenantRole/deleteById',
      method: 'post',
      data
    })
  },
  /**
   * 获取租户角色权限列表信息
   * @param {*} data
   * @returns
   */
  getRoleAuth(data) {
    return request({
      url: '/energy-carbon/grass-core/tenantRole/queryPermission',
      method: 'post',
      data
    })
  },
  /**
   * 获取租户角色权限列表信息
   * @param {*} data
   * @returns
   */
  allotPermission(data) {
    return request({
      url: '/energy-carbon/grass-core/tenantRole/allotPermission',
      method: 'post',
      data
    })
  },
  /**
   * 查看所属用户
   * @param {*} data
   * @returns
   */
  queryAscriptionUser(data) {
    return request({
      url: '/energy-carbon/grass-core/tenantRole/queryAscriptionUser',
      method: 'post',
      data
    })
  },
  /**
   * 查看所属用户
   * @param {*} data
   * @returns
   */
  updateAscriptionUser(data) {
    return request({
      url: '/energy-carbon/grass-core/tenantRole/updateAscriptionUser',
      method: 'post',
      data
    })
  },
  /**
   * 批量删除
   * @param {*} data
   * @returns
   */
  batchDelete(data) {
    return request({
      url: '/energy-carbon/grass-core/tenantRole/batchDelete',
      method: 'post',
      data
    })
  },
  /**
   * 查询角色关联用户
   * @param {*} data
   * @returns
   */
  queryAscriptionTenant(data) {
    return request({
      url: '/energy-carbon/grass-core/tenantRole/queryAscriptionTenant',
      method: 'post',
      data
    })
  },
  /**
   * 批量删除租户角色关联用户
   * @param {*} data
   * @returns
   */
  removeAscriptionTenant(data) {
    return request({
      url: '/energy-carbon/grass-core/tenantRole/removeAscriptionTenant',
      method: 'post',
      data
    })
  }
}
